
from __future__ import print_function

list1=[]
list1=input("Please input 6 numbers:")
new_list=list(list1)
print("The input list is:",new_list)
a=len(new_list)
for i in range(a):
    if new_list[i]==max(new_list):
        new_list[0],new_list[i]=new_list[i],new_list[0]
for i in range(a):
    if new_list[i]==min(new_list):
        new_list[a-1],new_list[i]=new_list[i],new_list[a-1]
print("List after comparison:",new_list)
        